package com.yao.activiti;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;

@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);


        // 自动建表
/*
        ProcessEngineConfiguration standalone = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();

        standalone.setJdbcDriver("com.p6spy.engine.spy.P6SpyDriver");
        standalone.setJdbcUrl("jdbc:p6spy:mysql://192.168.20.186:3306/activiti?useSSL=false&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true");
        standalone.setJdbcUsername("root");
        standalone.setJdbcPassword("123456");
        standalone.setHistoryLevel(HistoryLevel.FULL);
        standalone.setDbHistoryUsed(true);
        standalone.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
        standalone.setDatabaseSchema("ACT");

        standalone.buildProcessEngine();*/

        /*String resource = "activiti-context.xml";//设置xml文件的名字
        String beanName = "ProcessEngineConfiguration";//设置id
        ProcessEngineConfiguration conf = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(resource, beanName);
        ProcessEngine processEngine = conf.buildProcessEngine();*/
    }

}
